<?php // @version $Id: blog.php 11917 2009-05-29 19:37:05Z ian $
defined('_JEXEC') or die('Restricted access');

jimport('mylibs.function');
jimport('mylibs.globalModel');

$globalModel = new globalModel();
$template_dir = $this->baseurl.'/templates/mwc_careitec/assets/';
?>

<?php if ($this->params->get('show_page_title') && false) : ?>
<h1 class="componentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
	<?php echo $this->escape($this->params->get('page_title')); ?>
</h1>
<?php endif; ?>

<div id="main" class="p15t">
	<div class="w214 float_left">
		<div class="w214 left_menu m10b">
			<div class="left_menu">
				<ul>					
					<?php 
		            $sub_menu = $globalModel->getSubMenu('News');
		            foreach( $sub_menu as $key=>$value ){	
						$selected='';
						if($_GET['Itemid'] == $value['id']){
							$selected=' class="curr_left_menu"';
						}	                    	           	      	             	                         	
		            ?>	
                  	<li <?php echo $selected; ?>>
                  		<a href="<?php echo $value['link']."&Itemid=".$value['id'];?>" ><?php echo $value['name'];?></a>
                  	</li>                  
					<?php } ?>  
				</ul>
			</div>
			<div class="left_menu_bot"></div>
		</div>
		<div class="w214 po m10b">
			<div class="w214 bg_top_box_mid">
				<div class="w214 bg_top_box">
					<div class="mc w186 p10t p15b">
						<?php 
		                $item = $globalModel->getArticle(57);
		                foreach($item as $key=>$value ){	
		              	?>	                  
                   			<h2 class="organ_text upper"><b><?php echo $value['title']; ?></b></h2>
                    		<div class="p5t"><?php echo $value['introtext']; ?></div>
				  		<?php } ?>  
				   
                    	<div class="button_book p5t">
           	  				<a href="index.php?option=com_user&view=book"><img src="<?php echo $template_dir; ?>images/book_button.png" alt="" /></a>            
           	  			</div>
                  	</div>					
				</div>
			</div>
			<div class="w214 bg_bottom_box"></div>
		</div>		
		<div class="w214">
			<div class="ads_sub_top"></div>
			<div class="ads_sub_mid">
				<div class="w186 mc p10t p10b">						
					<a href="intel_details.html"><img src="images/banner_ads_sub.jpg" alt="" /></a>
					<p class="p5t">
						Lorem Ipsum er ganske enkelt fyldtekst fra print- og
						typografiindustrien. Lorem Ipsum har været standard fyldtekst siden
						1500-tallet...<a href="intel_details.html">mere</a>
					</p>
				</div>
			</div>
			<div class="ads_sub_bot"></div>
		</div>
	</div>

	<div class="w708 bg_left_col2 float_right p22l">
      	<div class="w708 bg_tt_sub1">
       	  	<h2 class="p5t float_left">Reservedele</h2>
            <p class="float_right p5t" style="display:none"><a href="#"><img src="<?php echo $template_dir; ?>images/tilbage_icon.png" alt="" /> Tilbage</a></p>
            <br style="clear:both" />
        </div>
        
        <div class="w708">
        	<?php        	      	      	
            $start = $this->pagination->limitstart;
            $limit = ($this->params->get('num_intro_articles', 8) != 8) ? 8 : 8;
            $end = $limit + $start;		
			$end_odd = false;    
			       
			for ($i = $start; $i < $end; $i++){
				if($i == $this->total){
					break;
				}
				
            	if($i % 2 == 0){
            		echo '<div class="w708 m15b">';
            	}
				
            	$this->item =& $this->getItem($i, $this->params);
            	echo '<div class="bg_pro w347 ' . ($i % 2 == 0 ? 'float_left' : 'float_right') . '">';
				echo $this->loadTemplate('item');
				echo '</div>';
				
				if($i % 2 != 0){					         			
            		echo '<div class="cb"></div>';
            		echo '</div>';
            	}  
            	
            	$end_odd = $i % 2 != 0;         	
            }
            if($end_odd){
            	echo '<div class="cb"></div>';
            	echo '</div>';
            }            
            ?>
        	        
        	<div class="pt w708">
	           	<ul>	           		
		        	<?php if ($this->params->get('show_pagination') == 2 && $this->pagination->get('pages.total') > 1) : ?>		
						<?php if ($this->params->def('show_pagination_results', 1)) : ?>
							<?php echo $this->pagination->getPagesLinks(); ?>
						<?php endif; ?>
					<?php endif; ?>               
	            </ul>
            	<br class="cb" />
        	</div>          
    	</div>        
	</div>         
</div>
<div id="footer" class="bg_foot_sub">
    <div class="w950 mc p15b">
    	<p class="float_left">Copyright © <?php echo date('Y'); ?> <a href="index.html">CAREITEC.DK</a>. All rights reserved.</p>
        <p class="float_right">Design by <a href="mywebcreations.dk" target="_blank">My Web Creations</a></p>
        <br style="clear:both" />
	</div>
</div>
